﻿<UserControl x:Class="Silverlight.Arcgis.MapTip.加载线路与轨迹"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"
    xmlns:esriGeometry="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client"
    xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client"
 xmlns:skybot="clr-namespace:Skybot.Arcgis.Client.TileLayerExpand;assembly=Skybot.Arcgis.Client.TileLayerExpand"    
             
             Width="Auto" Height="Auto">

  


    
    <Grid x:Name="LayoutRoot" Background="White">
      
        <esri:Map x:Name="MapObj">
            <esri:Map.Layers>
               
                <esri:ArcGISTiledMapServiceLayer Url="{StaticResource SH}" Initialized="ArcGISDynamicMapServiceLayer_Initialized" InitializationFailed="ArcGISTiledMapServiceLayer_InitializationFailed"/>
                <esri:ArcGISDynamicMapServiceLayer Initialized="ArcGISDynamicMapServiceLayer_Initialized" Url="{StaticResource 0223}"></esri:ArcGISDynamicMapServiceLayer>
                <!--<esri:FeatureLayer  Url="http://192.168.89.129/ArcGIS/rest/services/SH/MapServer/1" />-->
                <esri:GraphicsLayer ID="线路图层" ></esri:GraphicsLayer>
                <esri:GraphicsLayer ID="画图的图层" ></esri:GraphicsLayer>
                
                <esri:ElementLayer ID="原素图层" >        
                    <TextBlock  Text="sdfsdfs" x:Name="RecElementLayer" Width="30" Height="30" OpacityMask="#FFA70A0A"  >
                    	<TextBlock.Foreground>
                    		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    			<GradientStop Color="#FF000000"/>
                    			<GradientStop Color="#FFCA6868" Offset="1"/>
                    		</LinearGradientBrush>
                    	</TextBlock.Foreground>
                    </TextBlock>
               

                </esri:ElementLayer>
            </esri:Map.Layers>
            
        </esri:Map>
        <!-- 下载进度 -->
        <ProgressBar Height="34.5" x:Name="prog" HorizontalAlignment="Left" VerticalAlignment="Top" Width="264" />
        <TextBlock Text="" Height="34.5" VerticalAlignment="Top"   HorizontalAlignment="Left" Width="264" x:Name="tt" MouseLeftButtonDown="prog_MouseLeftButtonDown">

        </TextBlock>
        
        <Canvas Height="Auto" HorizontalAlignment="Right" Margin="0,0,23,39"  VerticalAlignment="Bottom" Width="Auto">
        	<!--控制进度的滑动条 -->
            <StackPanel Canvas.Top="-26" Canvas.Left="-173" >
                <Button Click="Button_Click" Content="加载线路"></Button>
                <Slider Width="195" x:Name="silder"  MouseLeftButtonUp="silder_MouseLeftButtonUp"    LargeChange="0.1" ValueChanged="silder_ValueChanged" SmallChange="0.1" Minimum="0"  Maximum="100"    Value="0"/>
            </StackPanel>
                
        </Canvas>
        
        <!-- 用于处理  Rec 移动的效果 -->
        <Canvas Height="Auto" Width="Auto">
            <TextBlock  x:Name="Rec" Width="30" Height="30" OpacityMask="#FFA70A0A"  >
                    	<TextBlock.Foreground>
                    		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    			<GradientStop Color="#FF000000"/>
                    			<GradientStop Color="#FFCA6868" Offset="1"/>
                    		</LinearGradientBrush>
                    	</TextBlock.Foreground>
                <TextBlock.DataContext>
                    <Button Content="车辆内部编码"></Button>
                </TextBlock.DataContext>
            </TextBlock>
        </Canvas>

<Grid    x:Name="可视化样式定义"   Visibility="Collapsed">
            <Grid.Resources>

                <ControlTemplate x:Key='TextSymbolStyle'    xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                    <Grid x:Name='RootElement' Margin="0,20,0,0"  RenderTransformOrigin="0,0" >
                        <Grid.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX='1'/>
                                <SkewTransform/>
                                <RotateTransform Angle='45'/>
                                <TranslateTransform/>
                            </TransformGroup>
                        </Grid.RenderTransform>
                        <Border x:Name='Border' Opacity='1' Background='#FFE9FFBE'  BorderBrush='Black' CornerRadius='1' BorderThickness='1'>
                            <TextBlock Text='这里写站名' />
                        </Border>
                    </Grid>
                </ControlTemplate>


            </Grid.Resources>
            <TextBlock Height="16" VerticalAlignment="Top">各图标所表示的意思</TextBlock>
            <ListBox>
                <ListBox.Items>
                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="上行线路颜色" Width="100"/>
                        <Path Stretch="Fill"  x:Name="RouteLineUpSymbolStyle"  Stroke="#FFFBA930" Fill="#FF1ECC12" StrokeThickness="5" Height="5" Width="80"  Data="M120,34 L401.5,34"/>
                    </StackPanel>
                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="下行线路颜色" Width="100"/>
                        <Path Stretch="Fill"  x:Name="RouteLineDownSymbolStyle"  Stroke="#FF3AC0FF" Fill="#FF1ECC12" StrokeThickness="5" Height="5" Width="80"  Data="M120,34 L401.5,34"/>
                    </StackPanel>
                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="下行站点图标" Width="100"/>
                        <Image Width="16" Height="16" x:Name="StationDownSiteStyle" Source="/images/浅蓝.png"/>
                    </StackPanel>

                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="上行站点图标" Width="100"/>
                        <Image Width="16" Height="16" x:Name="StationUpSiteStyle" Source="/images/桔红.png"/>
                    </StackPanel>
                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="一般车辆图标" Width="100"/>
                        <Image Width="32" Height="32" x:Name="RouteBusCommonStyle" Source="/images/car-blue-32x32.png"/>
                    </StackPanel>
                    <StackPanel  Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="离线车辆图标" Width="100"/>
                        <Image Width="32" Height="32" x:Name="RouteBusOffLineStyle" Source="/images/car-yellow-32x32.png"/>
                    </StackPanel>
                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="异常车辆图标" Width="100"/>
                        <Image Width="32" Height="32" x:Name="RouteBusErrorStyle" Source="/images/car-red-32x32.png"/>
                    </StackPanel>

                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="驾驭员请求图标" Width="100"/>
                        <Image Width="32" Height="32" x:Name="DriverRequestStyle" Source="/images/flag-cyan-32x32.png"/>
                    </StackPanel>
                </ListBox.Items>
            </ListBox>


        </Grid>
    </Grid>
</UserControl>
